<template>
  <div class="header">
    <div class="header-left"><span class="iconfont">&#xe624;</span></div>
    <div class="header-input"><span class="iconfont">&#xe632;</span>输入查找的内容</div>
    <router-link to="city">
      <div class="header-right">
        <!--{{this.$store.state.city}}-->
        {{this.city}}
        <span class="iconfont">&#xe6aa;</span>
      </div>
    </router-link>
  </div>
</template>

<script>
  import  {mapState} from "vuex"
  export default {
    name: "Header",
    computed:{
      ...mapState(['city'])
    }

  }
</script>

<style scoped>
  /*@import "../../../assets/styles/varibles.styl";*/
  /*1rem =html font-size=50px*/
  * {
    margin: 0;
    padding: 0;
  }

  .header {
    width: 100% !important;
    height: 43px;
    display: flex;
    line-height: 43px;
    background-color: #00bcd4;
  }

  .header-left {
    width: 32px;
    text-align: center;
    color: #fff;
  }

  .header-input {
    flex: 1;
    background-color: #fff;
    border-radius: 5px;
    margin-top: 6px;
    margin-bottom: 6px;
    line-height: 30px;
    color: #999;
    /*height:21px;*/

  }

  .header-right {
    min-width: 62px;
    padding: 0 0.1rem;
    float: right;
    color: #fff;
    text-align: center;
  }


</style>
